Conversation
…ki/C%2B%2BOpenCvExample Signed-off-by: Remy Mellet <[email protected]>
| find_package(Threads) | ||
| find_package( OpenCV REQUIRED ) | ||
|
|
||
| include_directories(. ${THREADS_PTHREADS_INCLUDE_DIR}) |
There was a problem hiding this comment.
include_directories(. ${THREADS_PTHREADS_INCLUDE_DIR}) doesn't seems to be needed, maybe other OS? (tested on Ubuntu 20.04 LTS)
There was a problem hiding this comment.
It should not be necessary - I think THREADS_PTHREADS_INCLUDE_DIR does not even exist in CMake anymore. But since you already require cxx_std_11, you could use std::thread and std::mutex instead of pthread in the code. Then there would be no need to find Threads package at all.
| find_package(Threads) | ||
| find_package( OpenCV REQUIRED ) | ||
|
|
||
| include_directories(. ${THREADS_PTHREADS_INCLUDE_DIR}) |
There was a problem hiding this comment.
It should not be necessary - I think THREADS_PTHREADS_INCLUDE_DIR does not even exist in CMake anymore. But since you already require cxx_std_11, you could use std::thread and std::mutex instead of pthread in the code. Then there would be no need to find Threads package at all.
|
|
||
| include_directories(. ${THREADS_PTHREADS_INCLUDE_DIR}) | ||
|
|
||
| add_executable( freenect-cppopencv cppopencv.cpp) |
There was a problem hiding this comment.
Suggestion - make this conditional on if (BUILD_EXAMPLES).
There was a problem hiding this comment.
that CMakeLists.txt is included only if BUILD_CV is enabled. Are you sure you want a 2nd condition?
There was a problem hiding this comment.
Ideally yes because this is an example. But I see the existing cvdemo does not depend on BUILD_EXAMPLES so it's just a suggestion.
Add example using C++ and OpenCV 2 to display and saving RGB + D frames
based on https://openkinect.org/wiki/C%2B%2BOpenCvExample
Need to enable BUILD_CV (
set (BUILD_CV ON))Signed-off-by: Remy Mellet [email protected]